<fieldset>
  <legend>搜索ip黑名单</legend>
    <form method="post">
    	<div>
    		<label>IP</label>
    		<input name="ip" type="text" value="<?php echo $this->context->request("ip") ?>" />
    		<a href="<?php echo Url::generate($this->context->uri['module'], 'Create', array("ip" => $this->context->request("ip"))) ?>">添加IP黑名单</a>
    	</div>
    	<div>
    		<label></label>
    		<input type="submit" class="submit" value="搜索" />
    	</div>
    </form>
</fieldset>
<fieldset>
	<legend>搜索结果</legend>
	<form method="post" action="<?php echo Url::generate($this->context->uri['module'], 'DoBatchRemove') ?>">
		<table>
		  <tr>
		    <th>删除</th>
		    <th>起始IP</th>
		    <th>结束IP</th>
		    <th>添加时间</th>
		 <tr>
		<?php
		if (isset($this->blacklists) && is_array($this->blacklists))
		{
			foreach ($this->blacklists as $blacklist)
			{
		?>
		  <tr>
		    <td><input name="blacklists[]" type="checkbox" value="<?php echo $blacklist['id'] ?>" /></td>
		    <td><?php echo $blacklist['begin_ip'] ?></td>
		    <td><?php echo $blacklist['end_ip'] ?></td>
		    <td><?php echo date('y-m-d H:i', $blacklist['created']) ?></td>
		  </tr>
		<?php
			}
		}
		?>
		</table>
		<input type="submit" class="submit" value="批量删除" />
	</form>
</fieldset>
